<?php

namespace Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * UserInLocation
 *
 * @ORM\Table(name="user_in_location")
 * @ORM\Entity
 */
class UserInLocation
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    protected $id;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="exit_time", type="datetime", nullable=true)
     */
    protected $exitTime;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="last_modified", type="datetime", nullable=false)
     */
    protected $lastModified;

    /**
     * @var \Entity\Location
     *
     * @ORM\ManyToOne(targetEntity="Entity\Location")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="location_id", referencedColumnName="id")
     * })
     */
    protected $location;

    /**
     * @var \Entity\User
     *
     * @ORM\ManyToOne(targetEntity="Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    protected $user;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set exitTime
     *
     * @param \DateTime $exitTime
     * @return UserInLocation
     */
    public function setExitTime($exitTime)
    {
        $this->exitTime = $exitTime;
    
        return $this;
    }

    /**
     * Get exitTime
     *
     * @return \DateTime 
     */
    public function getExitTime()
    {
        return $this->exitTime;
    }

    /**
     * Set lastModified
     *
     * @param \DateTime $lastModified
     * @return UserInLocation
     */
    public function setLastModified($lastModified)
    {
        $this->lastModified = $lastModified;
    
        return $this;
    }

    /**
     * Get lastModified
     *
     * @return \DateTime 
     */
    public function getLastModified()
    {
        return $this->lastModified;
    }

    /**
     * Set location
     *
     * @param \Entity\Location $location
     * @return UserInLocation
     */
    public function setLocation(\Entity\Location $location = null)
    {
        $this->location = $location;
    
        return $this;
    }

    /**
     * Get location
     *
     * @return \Entity\Location 
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Set user
     *
     * @param \Entity\User $user
     * @return UserInLocation
     */
    public function setUser(\Entity\User $user = null)
    {
        $this->user = $user;
    
        return $this;
    }

    /**
     * Get user
     *
     * @return \Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}
